home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Source / GNU / libg++ / libio / Makefile.in < prev    next >
Makefile  |  1994-02-15  |  4KB  |  97 lines

  1. # Copyright (C) 1993 Free Software Foundation
  2. # This file is part of the GNU IO Library.  This library is free
  3. # software; you can redistribute it and/or modify it under the
  4. # terms of the GNU General Public License as published by the
  5. # Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. # This library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with GNU CC; see the file COPYING.  If not, write to
  13. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  14.  
  15. srcdir = .
  16. VERSION = 0.63
  17. #### package, host, target, and site dependent Makefile fragments come in here.
  18. ##
  19.  
  20. INSTALLDIR = $(libdir)
  21.  
  22. IO_OBJECTS = filedoalloc.o floatconv.o genops.o fileops.o \
  23.   iovfprintf.o \
  24.   iovfscanf.o ioignore.o iopadn.o \
  25.   iofgetpos.o iofread.o iofscanf.o \
  26.   iofsetpos.o iogetline.o \
  27.   ioprintf.o ioseekoff.o ioseekpos.o \
  28.   outfloat.o stdfiles.o strops.o iofclose.o iopopen.o ioungetc.o
  29.  
  30. # These emulate stdio functionality, but with a different name (_IO_ungetc
  31. # instead of ungetc), and using _IO_FILE instead of FILE.
  32. # They are not needed for C++ iostream, nor stdio, though some stdio
  33. # files are build using the same source files (see stdio/configure.in).
  34. # They are needed for iostdio.h.
  35. # iofclose.o is not here, because it is needed for stdio (by pclose).
  36. STDIO_WRAP_OBJECTS =  iofdopen.o iofflush.o iofgets.o iofopen.o iofprintf.o iofputs.o iofwrite.o iogets.o ioperror.o ioputs.o ioscanf.o iosetbuffer.o iosetvbuf.o iosprintf.o iosscanf.o ioftell.o iovsprintf.o iovsscanf.o
  37.  
  38. IOSTREAM_OBJECTS = builtinbuf.o filebuf.o fstream.o \
  39.   indstream.o isgetline.o isgetsb.o isscan.o ioextend.o iomanip.o iostream.o \
  40.   osform.o procbuf.o sbform.o sbgetline.o sbscan.o \
  41.   stdiostream.o stdstreams.o stream.o streambuf.o strstream.o \
  42.   PlotFile.o SFile.o parsestream.o pfstream.o editbuf.o
  43.  
  44. # These files define _IO_read etc, which are just wrappers for read(2) etc.
  45. # They need to be changed to use name-space-clean (e.g. __read) versions
  46. # for each specific libc.
  47. OSPRIM_OBJECTS = ioprims.o iostrerror.o cleanup.o
  48.  
  49. LIBIOSTREAM_OBJECTS = $(IO_OBJECTS) $(IOSTREAM_OBJECTS) $(OSPRIM_OBJECTS)
  50. LIBIO_OBJECTS = $(IO_OBJECTS) $(STDIO_WRAP_OBJECTS) $(OSPRIM_OBJECTS)
  51.  
  52. libio.a: _G_config.h $(LIBIO_OBJECTS)
  53.     -rm -rf libio.a
  54.     $(AR) $(AR_FLAGS) libio.a $(LIBIO_OBJECTS)
  55.     $(RANLIB) libio.a
  56.  
  57. libiostream.a: _G_config.h $(LIBIOSTREAM_OBJECTS)
  58.     -rm -rf libiostream.a
  59.     $(AR) $(AR_FLAGS) libiostream.a $(LIBIOSTREAM_OBJECTS)
  60.     $(RANLIB) libiostream.a
  61.  
  62. test: test.o libio.a
  63.     $(CC) -o test test.o libio.a
  64. tpipe: tpipe.o libio.a
  65.     $(CC) -o tpipe tpipe.o libio.a
  66.  
  67. iostream.list: _G_config.h $(LIBIOSTREAM_OBJECTS)
  68.     @echo "$(LIBIOSTREAM_OBJECTS)"> iostream.list
  69.  
  70. # The CC=$(CXX) is a kludge to force use of gcc.
  71. _G_config.h: ${srcdir}/gen-params
  72.     rootme=`pwd`/ ; export rootme; \
  73.     CC="$(CXX) $(XTRAFLAGS)"; export CC; \
  74.     CXX="$(CXX) $(XTRAFLAGS) $(NOSTDINC)"; export CXX; \
  75.     CONFIG_NM="$(NM)"; export CONFIG_NM; \
  76.     $(SHELL) ${srcdir}/gen-params LIB_VERSION=$(VERSION) $(G_CONFIG_ARGS) >tmp-params.h
  77.     mv tmp-params.h _G_config.h
  78.  
  79. USER_INCLUDES = *.h
  80. install:
  81.     rm -f $(tooldir)/include/_G_config.h ; \
  82.       $(INSTALL_DATA) _G_config.h $(DSTROOT)/$(gxx_includedir)/_G_config.h || exit 1;
  83.     cd $(srcdir); \
  84.     for FILE in $(USER_INCLUDES) ; do \
  85.         rm -f $(DSTROOT)/$(gxx_includedir)/$$FILE ; \
  86.         $(INSTALL_DATA) $$FILE $(DSTROOT)/$(gxx_includedir)/$$FILE ; \
  87.         chmod a-x,a+r $(DSTROOT)/$(gxx_includedir)/$$FILE ; \
  88.     done
  89.     $(INSTALL_DATA) libiostream.a $(DSTROOT)/$(INSTALLDIR)/libiostream.a
  90.     $(RANLIB) $(DSTROOT)/$(INSTALLDIR)/libiostream.a
  91.     chmod a-x $(DSTROOT)$(INSTALLDIR)/libiostream.a
  92.  
  93. installhdrs:
  94.